﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using Microhard.ApproveFlow.Buz.Models;
using Microhard.ApproveFlow.Buz.DataAccess;

namespace Microhard.ApproveFlow.Buz.DTO
{
    public static class WorkflowMapExtension
    {
        #region WorkflowType
        public static ApproveFlowTypeModel ToModel(this t_WorkFlowType entity)
        {
            return Mapper.Map<ApproveFlowTypeModel>(entity);
        }

        public static t_WorkFlowType ToEntity(this ApproveFlowTypeModel model)
        {
            return Mapper.Map<t_WorkFlowType>(model);
        }
        #endregion

        #region FlowChart
        public static FlowChartModel ToModel(this t_FlowChart entity)
        {
            return Mapper.Map<FlowChartModel>(entity);
        }

        public static t_FlowChart ToEntity(this FlowChartModel model)
        {
            return Mapper.Map<t_FlowChart>(model);
        }
        #endregion

        #region t_WorkflowDataApproveResult
        public static ApproveResultModel ToModel(this t_WorkflowDataApproveResult entity)
        {
            return Mapper.Map<ApproveResultModel>(entity);
        }

        public static t_WorkflowDataApproveResult ToEntity(this ApproveResultModel model)
        {
            return Mapper.Map<t_WorkflowDataApproveResult>(model);
        }
        #endregion

    }
}
